<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
    <title>tueye后台管理-tueye后台管理-tueye专业的图片欣赏交流社区</title>
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" /> 
		<script type="text/javascript" src="<%=path %>/script/ext/ext-base.js"></script>
		<script type="text/javascript" src="<%=path %>/script/ext/ext-all.js"></script>
         <link rel="stylesheet" type="text/css"
			href="<%=path %>/themes/css/logonadmin.css" />
		<script type="text/javascript">
			Ext.onReady(function(){ 
		 		Ext.get("logon").on("click", function(){
		 			if(Ext.getDom("userName").value==""){
						　var msg = document.getElementById("msg");
							 
						　msg.innerHTML = "<font color='red'>请输入用户名</font>";
						return;
					}else{　var msg = document.getElementById("msg");
						　　msg.innerText ="";
						}
					if(Ext.getDom("passWord").value==""){
						　　 alert("请输入密码"); 
						return;
					}
					
					var msg = Ext.get('msg');
					msg.load({
						url: '<%=path%>/logon.do',
						params: 'userName='+Ext.getDom("userName").value+'&passWord='+Ext.getDom("passWord").value,
						text: 'Logoning...',
						callback: function(oElement) {
							if(oElement.dom.innerHTML=="success"){
								oElement.dom.innerHTML="<font color='green'>验证成功，,请稍候...</font>";
								window.setTimeout("window.location='<%=path %>/pages/admin/index.jsp'", 200);
							}
	                    }
					});
					msg.show();
			    });
			    
			    Ext.get("close").on("click",function(){ 　
			    			window.close();　　
			    });
			    
			});
 		</script>

	</head>
	<body class="logon-body">
		<div id="abc">
<p>TuEye后台管理中心</p>
<form action="">
<table align="center">
<tr><td align="right">登录名：</td><td align="left"> <input type="text" id="userName" name="userName" /></td></tr>
<tr><td align="right">密码： </td><td align="left"> <input type="password" id="passWord" name="passWord"  /></td></tr>
<tr><td height="40px" colspan="2" align="center">
<input id="logon" type="button"  value="提交"  style="height:20px;"/>
<input id="close" type="button" value="关闭" style="height:20px;"/></td></tr>
</table>
</form>
<div id="msg"></div>
</div>
	</body>
</html>
